﻿using System;
using System.Windows.Forms;

namespace FileTracker.Forms
{
    public partial class FormYesNoYestoall : Form
    {
        private DialogResultEx _DilaogResultEx = DialogResultEx.No;

        public DialogResultEx DialogResultEx
        {
            get
            {
                return _DilaogResultEx;
            }
        }

        public FormYesNoYestoall()
        {
            InitializeComponent();
        }

        public void ShowDialog(string text, string title)
        {
            this.Text = title;
            labelMessage.Text = text;
            base.ShowDialog();
        }

        private void buttonYes_Click(object sender, EventArgs argEventArgs)
        {
            _DilaogResultEx = DialogResultEx.Yes;
            this.Close();
        }

        private void buttonNo_Click(object sender, EventArgs argEventArgs)
        {
            _DilaogResultEx = DialogResultEx.No;
            this.Close();
        }

        private void buttonYestoall_Click(object sender, EventArgs argEventArgs)
        {
            _DilaogResultEx = DialogResultEx.YesToAll;
            this.Close();
        }


    }

    public enum DialogResultEx
    {
        Yes, 
        No,
        YesToAll
    }
}
